package org.fang.service.impl;

import org.fang.dao.UserDao;
import org.fang.pojo.CloudUser;
import org.fang.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author forsake
 * @Description
 * @Date 17:17 2022/3/9
 **/
@Service("UserServiceImpl")
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;

    @Override
    public boolean add(CloudUser user) {
        boolean b = userDao.add(user);
        return b;
    }

    @Override
    public CloudUser queryById(Integer id) {
        CloudUser cloudUser = userDao.queryById(id);
        return cloudUser;
    }

    @Override
    public List<CloudUser> queryAll() {
        List<CloudUser> cloudUsers = userDao.queryAll();
        return cloudUsers;
    }
}
